/*
 * @Author: zhangwei 1405298045@qq.com
 * @Date: 2022-02-22 10:48:47
 * @LastEditTime: 2022-03-30 17:53:09
 * @LastEditors: zhangwei 1405298045@qq.com
 * @Description:
 * @FilePath: /ll-fe-mp-dyfx/src/api/index.js
 *
 */
import { GET } from '@/service';

/**
 * 探店 查询banner
 */
export const getIndexListBanner = (params) => {
	const url = '/api/tdBanner/listBanner/new';

	return GET(url, {
		...params,
		/* eslint-disable */
		// #ifdef MP-WEIXIN
		channel: 1,
		// #endif

		// #ifndef MP-WEIXIN
		channel: 2
		// #endif
		/* eslint enable */
	});
};

/**
 * 站点列表查询
 * @param {*} params
 */
export const getLocationList = (params) => {
	const url = '/api/tdProduct/location/list';

	return GET(url, params);
};

export const getLocationSearchList = (params) => {
	const url = '/api/tdProduct/location/search';

	return GET(url, params);
};

/**
 * 产品品类列表查询
 * @param {*} params
 */
export const getTypeList = (params) => {
	const url = '/api/tdProduct/type/list';

	return GET(url, params);
};


/**
 * 产品品类列表查询
 * @param {*} params
 */
export const getProductList = (params) => {
	const url = '/api/tdProduct/list';

	return GET(url, params);
};

/**
 * 产品品类列表查询-new
 * @param {*} params
 */
 export const getProductListNew = (params) => {
	const url = '/api/tdProduct/list/v2';

	return GET(url, params);
};
// https://mp-dyfx-pre.lianlianlvyou.com/api/tdProduct/list/v2?locationId=1&type=1&sortType=1&latitude=30.541043&longitude=104.061082&discountType=2&cpsRateType=2&pageIndex=1&isFirstVisit=1
/**
 * 获取精选作品列表
 * @param {*} params
 * @returns
 */
export const getMaterialFeaturedWorks = (params) => {
	const url = '/api/tdBanner/sift-work/list';

	return GET(url, params);
};

/**
 * 获取达运id
 * @param {*} params
 * @returns
 */
 export const getOperateId = (params) => {
	const url = '/api/userInfo/operateId';

	return GET(url, params);
};
